home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Utilities / System 7 / Menu Events 1.1.1 / Menu Events.h < prev   
Text File  |  1994-04-12  |  3KB  |  97 lines

  1. /*______________________________________________________________________
  2.  
  3.     Menu Events
  4.     
  5.     Version 1.1.1
  6.  
  7.     an AWOL Software Production
  8.     PO Box 24207
  9.     300 Eagleson Road
  10.     Kanata, Ontario, Canada K2M 2C3
  11.  
  12.     Internet: ab026@freenet.carleton.ca
  13.     
  14.     Copyright © 1994 Ross Brown.  All rights reserved.
  15. _____________________________________________________________________*/
  16.  
  17.  
  18. /*______________________________________________________________________
  19.     
  20.     'Menu Events'.h - Menu Events Definitions.
  21.  
  22.     This file defines the Apple events which you can send to any
  23.     high-level-event-aware process when Menu Events is installed.
  24.     
  25.     The Query Menu List event returns a list of menu info records,
  26.     each with ID, title, and enabled/disabled status.
  27.     
  28.     The Query Menu event, given a menu ID, returns a list of menu
  29.     item records, each with ID, title, enabled/disabled status,
  30.     mark character, icon number, style, and Command-key character.
  31.     
  32.     The Select Menu Item event, given a menu ID and menu item ID,
  33.     causes the target to act as if the given item had been selected
  34.     by the user.
  35.     
  36.     Use AppleScript's Script Editor or any Apple event tool to read
  37.     the dictionary for this suite of events from the Menu Events
  38.     Scripting Addition file.  See the Menu Events Sample Script file
  39.     for an example of Menu event scripting.  There is also a full
  40.     description of the Menu Events suite in the Menu Events Help file.
  41. _____________________________________________________________________*/
  42.  
  43.  
  44. #ifndef    __MENU_EVENTS__
  45. #define    __MENU_EVENTS__
  46.  
  47.  
  48. #ifndef    __TYPES__
  49. #include    <Types.h>
  50. #endif
  51.  
  52.  
  53. /* Signature of the Menu Events extension. */
  54.  
  55. #define    kMESignature    'Mænu'
  56.  
  57.  
  58. /* Gestalt selector and response bits for the Menu Events extension. */
  59.  
  60. #define    gestaltMenuEventsAttr    kMESignature
  61.  
  62. #define    gestaltMEQueryEventSupport    0
  63. #define    gestaltMESelectEventSupport    1
  64.  
  65.  
  66. /* Error codes returned by the Menu Events Apple event suite. */
  67.  
  68. #define    noSuchMenuErr    -21000            /* no such menu in menu bar */
  69. #define    noSuchMenuItemErr    -21001        /* no such item in menu */
  70. #define    menuItemDisabledErr    -21002        /* item is disabled */
  71. #define    menuEventPendingErr    -21003        /* another menu event is pending */
  72. #define    nonStandardMenuErr    -21004        /* menu does not use standard 'MDEF' */
  73.  
  74.  
  75. /* Class, ID, and key definitions for the Menu Events Apple event suite. */
  76.  
  77. #define    kMEEventClass    kMESignature
  78.  
  79. #define    kAEMEQueryMenuList    'qmn#'
  80. #define    kAEMEQueryMenu    'qmn '
  81. #define    kAEMESelectMenuItem    'semi'
  82.  
  83. #define    keyMenuID    'mnid'
  84. #define    keyMenuTitle    'mnti'
  85. #define    keyMenuEnabled    'mnen'
  86. #define    keyMenuItemID    'miid'
  87. #define    keyMenuItemText    'mite'
  88. #define    keyMenuItemEnabled    'mien'
  89. #define    keyMenuItemMark    'mima'
  90. #define    keyMenuItemIcon    'miic'
  91. #define    keyMenuItemStyle    'mist'
  92. #define    keyMenuItemCmd    'micm'
  93. #define    keyMenuEventsTattoo    kMESignature    /* null; presence verifies handling of event */
  94.  
  95.  
  96. #endif    __MENU_EVENTS__
  97.